/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.shinyray.project.entity;

import com.shinyray.org.entity.Orgnization;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;

/**
 * 合作协议的签收情况。签收是指收到对方回执，签收是一定要有签出作为
 * 依据的
 * @author Administrator
 */
@Entity
public class CPPSignIn implements Serializable {
    private static final long serialVersionUID = 1L;
    //签收人帐号
    private String signerAccount;
    //签收人姓名
    private String signerName;
    //签收协议的来源机构
    @ManyToOne
    private Orgnization fromOrg;
    //签收机构
    @ManyToOne
    private Orgnization signOrg;
    //签收时间
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date signDate;
    //签出信息.由于存在修正的可能，因此有可能会收到对方多次送出的协议进行签收
    @ManyToOne
    private CPPSignOut cppSignOut;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CPPSignIn)) {
            return false;
        }
        CPPSignIn other = (CPPSignIn) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.shinyray.project.entity.CPPSignInfoEntity[id=" + id + "]";
    }

    public Orgnization getFromOrg() {
        return fromOrg;
    }

    public void setFromOrg(Orgnization fromOrg) {
        this.fromOrg = fromOrg;
    }

    public Date getSignDate() {
        return signDate;
    }

    public void setSignDate(Date signDate) {
        this.signDate = signDate;
    }

    public Orgnization getSignOrg() {
        return signOrg;
    }

    public void setSignOrg(Orgnization signOrg) {
        this.signOrg = signOrg;
    }

    public String getSignerAccount() {
        return signerAccount;
    }

    public void setSignerAccount(String signerAccount) {
        this.signerAccount = signerAccount;
    }

    public String getSignerName() {
        return signerName;
    }

    public void setSignerName(String signerName) {
        this.signerName = signerName;
    }

    public CPPSignOut getCppSignOut() {
        return cppSignOut;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }
}
